@import url(./merak.scss);
@import url(./merak-table.scss);

/* flex */
.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flx-align-center {
  display: flex;
  align-items: center;
}

/* clearfix */
.clearfix::after {
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
  content: "";
}

/* 文字单行省略号 */
.sle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 文字多了自动換行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.2s;
}

.fade-transform-enter-from {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(-30px);
}

.fade-transform-leave-to {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(30px);
}

/* breadcrumb-transform */
.breadcrumb-enter-active {
  transition: all 0.2s;
}

.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.merak-table ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--el-border-color-darker);
  border-radius: 20px;
}

/* nprogress */
#nprogress .bar {
  background: var(--el-color-primary) !important;
  z-index: 9999;
}

#nprogress .spinner-icon {
  border-top-color: var(--el-color-primary) !important;
  border-left-color: var(--el-color-primary) !important;
}

#nprogress .peg {
  box-shadow:
    0 0 10px var(--el-color-primary),
    0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 100 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }

  .mr#{$i} {
    margin-right: #{$i}px !important;
  }

  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }

  .ml#{$i} {
    margin-left: #{$i}px !important;
  }

  .pt#{$i} {
    padding-top: #{$i}px !important;
  }

  .pr#{$i} {
    padding-right: #{$i}px !important;
  }

  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }

  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
}

/* 公共表单样式 */
.merak_tag_red {
  color: #000 !important;
}

// 设置options

//设置option列表的样式
// .el-popper.is-pure {
//   padding: 0;
//   border: 1px solid rgba(0, 83, 91, 1);
//   border-radius: 4px;
//   background: rgba(0, 83, 91, 1) !important;
// }
//每一个option
// .el-select-dropdown__item {
//  border-bottom: 1px solid rgba(216, 216, 216, 0.1);
// color: var(--font-color-option) !important;
// }

//鼠标滑过option时
// .el-select-dropdown__item.hover {
//   background-color: var(--hover-color-option) !important;
//   color: var(--font-color-option) !important;
// }
//选中一个option
// .el-select-dropdown__item.selected {
//   content: unset !important;
//   color: $white !important;
//   background-color: $primary-color !important;
// }
//option为空的时候
// .el-select-dropdown__empty {
//   color: var(--el-disabled-text-color);
// }
// //鼠标滑过select框，去掉白框
// .el-select:hover:not(.el-select--disabled) .el-input__wrapper {
//   box-shadow: unset;
// }

// // 多选选中
// .el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
//   color: var(--el-color-primary) !important;
//   background-color: var(--el-bg-color-overlay) !important;
//   position: relative;
// }

// .el-select-dropdown.is-multiple .select_mulit_check .el-checkbox__input {
//   opacity: 0;
// }
// .select_mulit_check .el-checkbox__label {
//   color: var(--font-color-option);
// }
// .el-select-dropdown.is-multiple .el-select-dropdown__header {
//   padding: 0px;
//   padding-top: 10px;
//   padding-left: 10px;
//   border-bottom: none;
// }

// .el-select-dropdown.is-multiple .select_mulit_check .el-checkbox__input.is-checked + .el-checkbox__label {
//   color: var(--font-color-option);
// }

//顶部悬浮标签浮动样式
.toolbar-link {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 34px;
  width: 34px;
  border-radius: 9999px;
  margin: 0 4px;
  transition: all 0.3s;
  cursor: pointer;
}
.toolbar-link img {
  display: block;
  height: 24px;
  width: 24px;
  min-width: 24px;
  border-radius: 9999px;
}

.toolbar-link:hover {
  background: #fff;
  border-color: hsl(0 0% 93%);
  box-shadow: -1px 3px 10px 0 rgb(0 0 0 / 10%);
}
.dark .toolbar-link:hover {
  background: hsl(240 4% calc(14% + 2%));
}
// .toolbar-link:focus {
//     outline-offset: 3px;
//     outline-width: 1px;
//     outline-style: dashed;
//     outline-color: hsl( 0 0% calc( 93% - 8%) );
// }
.el-button:focus {
  color: var(--el-button-text-color) !important;
  border-color: var(--el-button-border-color) !important;
  background-color: var(--el-button-bg-color) !important;
  outline: 0;
}
.el-button.is-link:not(.is-disabled):focus,
.el-button.is-link:not(.is-disabled):hover {
  border-color: transparent !important;
  background-color: transparent !important;
}
.el-button.is-link:focus {
  color: var(--el-button-text-color) !important;
}

.el-button--default.is-plain:focus,
.el-button--default.is-plain {
  background-color: transparent !important;
}
.el-button--default.is-plain:hover {
  // background-color: var(--el-color-primary-light-9) !important;
  // color: var(--el-color-primary);
  color: var(--el-button-text-color) !important;
}

// 按钮自动
.qf_btn_auto.el-button {
  min-width: auto;
}

.merakTree .el-tree-node {
  white-space: break-spaces;
}
.filter .el-scrollbar .el-tree .el-tree-node__content {
  // height: auto !important;
  // padding-top: 7px !important;
  // padding-bottom: 7px !important;
}

// .el-tree-node {
//   white-space: normal !important;
// }

// 清除 safari 图标
input {
  &::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
  }
  &:focus::-webkit-contacts-auto-fill-button {
    opacity: 0;
  }
}

// tip 样式
.dark .el-popper {
  --merak-popper-color: #000;
  --merak-popper-bg-color: #929294;
}
.el-popper {
  --merak-popper-color: #fff;
  --merak-popper-bg-color: #777777;
  &:not(.el-popover):not(.el-select__popper):not(.el-picker__popper) {
    max-width: 376px;
    line-height: 16px;
    font-size: 12px;
    opacity: 0.9;
    backdrop-filter: blur(0px);
    &.is-dark {
      color: var(--merak-popper-color);
      background-color: var(--merak-popper-bg-color);
      border: none;
      & > .el-popper__arrow::before {
        background-color: transparent;
        border: 5px solid var(--merak-popper-bg-color);
      }
    }
  }
}
